package com.caowei.weicimpress.weicimpress;

/**
 * Created by caoweiPc on 2014/7/16.
 */
public class MyException extends RuntimeException {
    //致命异常
    public final static int   ERROR=-1;

    public final static int   FAIL_COMPRESS=0;
    public final static int   FAIL_EXTRACT=1;
    public final static int   FAIL_EXTRACT_BYPASSWDERROR=2;
    //压缩文件损坏
    public final static int   COMPRESSFILEDAMAGE=3;
    private int code=0;
    public MyException() {
    }
    public MyException(int code) {
    }
    public MyException(String name) {
        super(name);
    }
    public MyException(String name,int code) {
        super(name);
        this.code=code;
    }

    public MyException(String name, Throwable cause) {
        super(name, cause);
    }

    public MyException(String name, Throwable cause,int code) {
        super(name, cause);
        this.code=code;
    }

    public MyException(Exception cause) {
        super(cause);
    }

    public MyException(Exception cause,int code) {
        super(cause);
        this.code=code;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
